package demo;

public class Amimal {
    protected String name;
    protected int age;
    public final void eat(){
        System.out.println(name + "正在吃饭");
    }

    public static void main(String[] args) {
        Dog dog = new Dog();
        dog.eat();
    }
}


class Dog extends Amimal {
    @Override
    public  void eat(){
        System.out.println("小狗正在吃饭");
    }
}